<template>
    <div>
      <LeftMenu :menuData="menuData"></LeftMenu>
      <GoodsContent :goods="goods"></GoodsContent>
      <ShopCar></ShopCar>
    </div>
</template>

<script>
import LeftMenu from './components/LeftMenu.vue'
import GoodsContent from './components/GoodsContent.vue'
import ShopCar from '../common/ShopCar.vue'
export default {
  name: '',
  props: { goods: Array },
  components: {
    LeftMenu,
    GoodsContent,
    ShopCar
  },
  computed: {
    menuData () {
      let arr = []
      let goods = this.goods
      for (let i in goods) {
        arr.push({
          'id': i,
          'name': goods[i].name,
          'type': goods[i].type
        })
      }
      return arr
    }
  }
}
</script>

<style lang='scss' scoped>
</style>
